cmake_minimum_required(VERSION 3.5)
project(turtle_control)

# 查找依赖包
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)

# ncurses库
find_package(Curses REQUIRED)

add_executable(keyboard_control src/keyboard_control.cpp)

include_directories(${CURSES_INCLUDE_DIRS})

target_link_libraries(keyboard_control
  ${rclcpp_LIBRARIES}
  ${geometry_msgs_LIBRARIES}
  ${CURSES_LIBRARIES}
)

# 添加依赖
ament_target_dependencies(keyboard_control rclcpp geometry_msgs)


install(TARGETS keyboard_control DESTINATION lib/${PROJECT_NAME}
)

ament_package()
